package jay;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;

public class JWTDemo2 {
    public static void main(String[] args) {
        String jwt = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2NiIsInN1YiI6Im1heWlrdCIsImlhdCI6MTYxNzUxODk1NCwidXNlcm5hbWUiOiJqaWVsaW4ifQ.naLH38W2kbYZUFDF0TEfF9_baoqyznyuFsOe1BompBM";
        Claims body = Jwts.parser()
                .setSigningKey("mayiktKey")
                .parseClaimsJws(jwt)
                .getBody();
        System.out.println(body.get("username"));
    }
}
